package com.jijuxie.house.domain;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.jijuxie.common.core.BaseEntity;

import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@TableName("house_info")
@EqualsAndHashCode(callSuper = true)
public class HouseInfo extends BaseEntity {

    @TableId(type = IdType.AUTO)
    private Long houseId;
    @TableField("agent_id")
    private Long agentId;
    private String title;
    /**
     * 房源类型（1二手房 2新房 3租房）
     */
    private String houseType;
    /**
     * 物业类型（1住宅 2商铺 3写字楼）
     */
    private String propertyType;
    private String province;
    private String city;
    private String district;
    private String address;
    /**
     * 面积（平方米）
     */
    private BigDecimal area;
    /**
     * 价格
     */
    private BigDecimal price;
    /**
     * 价格单位（万）
     */
    @TableField("price_unit")
    private String priceUnit;
    private Integer bedroom;
    private Integer livingRoom;
    private Integer bathroom;
    private Integer floor;
    private Integer totalFloor;
    /**
     * 朝向（E东 S南 W西 N北）
     */
    private String orientation;
    /**
     * 装修情况（1毛坯 2简装 3精装）
     */
    private String decoration;
    /**
     * 经度
     */
    private BigDecimal lng;
    /**
     * 纬度
     */
    private BigDecimal lat;
    /**
     * 房源设施，关联表存储
     */
    @TableField(exist = false)
    private List<HouseFacility> facilities;
    private String description;
    /**
     * 状态（0待审核 1已上架 2已下架 3已成交）
     */
    private String status;
    /**
     * 删除标志（0存在 1删除）
     */
    @TableLogic(value = "0", delval = "1")
    @TableField("del_flag")
    private String delFlag;
    /**
     * 封面图片
     */
    @TableField(exist = false)
    private String coverImage;
    /**
     * 房源图片，关联表存储
     */
    @TableField(exist = false)
    private List<HouseImage> images;
    @TableField("display_order")
    private Integer displayOrder;

    /**
     * 收藏数量
     */
    @TableField("collect_count")
    private Integer collectCount;

    /**
     * 发布者ID（用户ID）
     */
    @TableField("publisher_id")
    private Long publisherId;

    /**
     * 审核状态（0待审核 1已通过 2已拒绝）
     */
    @TableField("audit_status")
    private String auditStatus;

    /**
     * 审核人ID（经纪人ID）
     */
    @TableField("auditor_id")
    private Long auditorId;

    /**
     * 审核时间
     */
    @TableField("audit_time")
    private LocalDateTime auditTime;

    /**
     * 审核备注
     */
    @TableField("audit_remark")
    private String auditRemark;

    // 经纪人基本信息（非数据库字段）
    @TableField(exist = false)
    private String agentName;

    @TableField(exist = false)
    private String agentAvatar;

    @TableField(exist = false)
    private String agentTitle;

    // 经纪人联系方式（非数据库字段）
    @TableField(exist = false)
    private String agentPhone;

    @TableField(exist = false)
    private String agentWechat;

    // 经纪人统计信息（非数据库字段）
    @TableField(exist = false)
    private Integer agentExperience;

    @TableField(exist = false)
    private Integer agentDeals;

    @TableField(exist = false)
    private BigDecimal agentRating;

    // 经纪人统计信息
    @TableField(exist = false)
    private Map<String, Object> agentStats;

    public Long getHouseId() {
        return houseId;
    }

    public void setHouseId(Long houseId) {
        this.houseId = houseId;
    }

    public Long getAgentId() {
        return agentId;
    }

    public void setAgentId(Long agentId) {
        this.agentId = agentId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getHouseType() {
        return houseType;
    }

    public void setHouseType(String houseType) {
        this.houseType = houseType;
    }

    public String getPropertyType() {
        return propertyType;
    }

    public void setPropertyType(String propertyType) {
        this.propertyType = propertyType;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getDistrict() {
        return district;
    }

    public void setDistrict(String district) {
        this.district = district;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public BigDecimal getLng() {
        return lng;
    }

    public void setLng(BigDecimal lng) {
        this.lng = lng;
    }

    public BigDecimal getLat() {
        return lat;
    }

    public void setLat(BigDecimal lat) {
        this.lat = lat;
    }

    public BigDecimal getArea() {
        return area;
    }

    public void setArea(BigDecimal area) {
        this.area = area;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public String getPriceUnit() {
        return priceUnit;
    }

    public void setPriceUnit(String priceUnit) {
        this.priceUnit = priceUnit;
    }

    public Integer getBedroom() {
        return bedroom;
    }

    public void setBedroom(Integer bedroom) {
        this.bedroom = bedroom;
    }

    public Integer getLivingRoom() {
        return livingRoom;
    }

    public void setLivingRoom(Integer livingRoom) {
        this.livingRoom = livingRoom;
    }

    public Integer getBathroom() {
        return bathroom;
    }

    public void setBathroom(Integer bathroom) {
        this.bathroom = bathroom;
    }

    public Integer getFloor() {
        return floor;
    }

    public void setFloor(Integer floor) {
        this.floor = floor;
    }

    public Integer getTotalFloor() {
        return totalFloor;
    }

    public void setTotalFloor(Integer totalFloor) {
        this.totalFloor = totalFloor;
    }

    public String getOrientation() {
        return orientation;
    }

    public void setOrientation(String orientation) {
        this.orientation = orientation;
    }

    public String getDecoration() {
        return decoration;
    }

    public void setDecoration(String decoration) {
        this.decoration = decoration;
    }

    public List<HouseFacility> getFacilities() {
        return facilities;
    }

    public void setFacilities(List<HouseFacility> facilities) {
        this.facilities = facilities;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getCoverImage() {
        return coverImage;
    }

    public void setCoverImage(String coverImage) {
        this.coverImage = coverImage;
    }

    public List<HouseImage> getImages() {
        return images;
    }

    public void setImages(List<HouseImage> images) {
        this.images = images;
    }

    public Integer getDisplayOrder() {
        return displayOrder;
    }

    public void setDisplayOrder(Integer displayOrder) {
        this.displayOrder = displayOrder;
    }

    public Integer getCollectCount() {
        return collectCount;
    }

    public void setCollectCount(Integer collectCount) {
        this.collectCount = collectCount;
    }

    public Long getPublisherId() {
        return publisherId;
    }

    public void setPublisherId(Long publisherId) {
        this.publisherId = publisherId;
    }

    public String getAuditStatus() {
        return auditStatus;
    }

    public void setAuditStatus(String auditStatus) {
        this.auditStatus = auditStatus;
    }

    public Long getAuditorId() {
        return auditorId;
    }

    public void setAuditorId(Long auditorId) {
        this.auditorId = auditorId;
    }

    public LocalDateTime getAuditTime() {
        return auditTime;
    }

    public void setAuditTime(LocalDateTime auditTime) {
        this.auditTime = auditTime;
    }

    public String getAuditRemark() {
        return auditRemark;
    }

    public void setAuditRemark(String auditRemark) {
        this.auditRemark = auditRemark;
    }

    public String getAgentName() {
        return agentName;
    }

    public void setAgentName(String agentName) {
        this.agentName = agentName;
    }

    public String getAgentAvatar() {
        return agentAvatar;
    }

    public void setAgentAvatar(String agentAvatar) {
        this.agentAvatar = agentAvatar;
    }

    public String getAgentTitle() {
        return agentTitle;
    }

    public void setAgentTitle(String agentTitle) {
        this.agentTitle = agentTitle;
    }

    public String getAgentPhone() {
        return agentPhone;
    }

    public void setAgentPhone(String agentPhone) {
        this.agentPhone = agentPhone;
    }

    public String getAgentWechat() {
        return agentWechat;
    }

    public void setAgentWechat(String agentWechat) {
        this.agentWechat = agentWechat;
    }

    public Integer getAgentExperience() {
        return agentExperience;
    }

    public void setAgentExperience(Integer agentExperience) {
        this.agentExperience = agentExperience;
    }

    public Integer getAgentDeals() {
        return agentDeals;
    }

    public void setAgentDeals(Integer agentDeals) {
        this.agentDeals = agentDeals;
    }

    public BigDecimal getAgentRating() {
        return agentRating;
    }

    public void setAgentRating(BigDecimal agentRating) {
        this.agentRating = agentRating;
    }

    public Map<String, Object> getAgentStats() {
        return agentStats;
    }

    public void setAgentStats(Map<String, Object> agentStats) {
        this.agentStats = agentStats;
    }
}
